import request from '@/utils/request'

// 查询财务核心-凭证列表
export function listFinAuxiliaryAccounting(query) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/list',
    method: 'get',
    params: query
  })
}
// 查询财务核心-凭证列表
export function getAuxiliaryAccountList(query) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/getAuxiliaryAccountList',
    method: 'get',
    params: query
  })
}

// 查询当前账套的年月集合
export function getYearMonthList(query) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/getYearMonthList',
    method: 'get',
    params: query
  })
}

// 查询财务核心-凭证详细
export function getFinAuxiliaryAccounting(id) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/' + id,
    method: 'get'
  })
}

// 保存财务核心-凭证
export function saveFinAuxiliaryAccounting(data) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/save',
    method: 'post',
    data: data
  })
}
// 保存财务核心-凭证
export function copyFinAuxiliaryAccounting(data) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/copyFinAuxiliaryAccounting',
    method: 'post',
    data: data
  })
}

// 保存财务核心-凭证
export function getAccountNum(data) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/getAccountNum',
    method: 'post',
    data: data
  })
}

// 修改备注
export function updateRemarkInVoucher(data) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/updateRemarkInVoucher',
    method: 'post',
    data: data
  })
}

// 删除财务核心-凭证
export function delFinAuxiliaryAccounting(id) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/' + id,
    method: 'delete'
  })
}

// 批量删除凭证
export function batchDeleteAuxiliaryAccounting(data) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/batchDeleteAuxiliaryAccounting',
    method: 'post',
    data: data
  })
}

// 批量删除凭证
export function arrangeVoucherNumber(data) {
  return request({
    url: '/auxiliaryAccounting/finAuxiliaryAccounting/arrangeVoucherNumber',
    method: 'post',
    data: data
  })
}
